using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class ImagesBLL
	{
		private ImagesDAO _ImagesDAO;

		public ImagesDAO ImagesDAO
		{
			get { return _ImagesDAO; }
			set { _ImagesDAO = value; }
		}

		public ImagesBLL()
		{
			ImagesDAO = new ImagesDAO();
		}
		public List<Images> GetImagess()
		{
			try
			{
				return ImagesDAO.GetImagess();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
        public List<Images> GetBanner()
		{
			try
			{
				return ImagesDAO.GetBanner();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
        public List<Images> GetPartners()
        {
            try
            {
                return ImagesDAO.GetPartners();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
		public Images GetImages(int Id)
		{
			try
			{
				return ImagesDAO.GetImages(Id);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddImages(Images oImages)
		{
			try
			{
				return ImagesDAO.AddImages(oImages);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateImages(Images oImages)
		{
			try
			{
				return ImagesDAO.UpdateImages(oImages);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveImages(Images oImages)
		{
			try
			{
				return ImagesDAO.RemoveImages(oImages);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveImages(int Id)
		{
			try
			{
				return ImagesDAO.RemoveImages(Id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<Images> DeserializeImagess(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<Images>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeImagess(string Path, List<Images> Imagess)
		{
			try
			{
				GenericXmlSerializer<List<Images>>.Serialize(Imagess, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
